package com.skp.shaphan.ui.buttons;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JDialog;

public class DialogCancelButton extends JButton implements ActionListener {
	/**
	 * 
	 */
	private static final long serialVersionUID = -3198756123987599845L;
	private JDialog dialog;
	public DialogCancelButton(JDialog dialog) {
		super("Cancel");
		this.dialog = dialog;
		this.addActionListener(this);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		dialog.dispose();
	}
}
